{% extends "cartoon/cartoonbase.html" %}
{% block title %}
<title>All Cartoon List:</title>
{% endblock %}
{% block content %}
    <h1>All Cartoon List:</h1>
    <h2>总共：{{ size }}部</h2>
    <table border="1px" cellspacing="0px">
    <tr>
        <th align=left width="10%">ID</th>
        <th align=left width="10%">Name</th>
        <th align=left width="10%">Date</th>
        <th align=left width="10%">Preview</th>
    </tr>
        {% for cartoon in cartoons %}
            <tr>
                <td width="10%">{{ cartoon.getId }}</td>
                <td width="10%">{{ cartoon.name }}</td>
                <td width="10%">{{ cartoon.date|date:'Y-m-d' }}</td>
                <td width="10%">
                    {% for img in cartoon.cartoonpicture_set.all %}

                        <a href=" {{ img.getImgUrl }} "  width="60" height="4" rel="lightbox[{{ img.pname }}]">
                            <img src="{{ img.getThumbUrl }}">
                        </a>

                    {% endfor %}
                </td>
                <td width="2%">
                    <a href="{{ cartoon.getId }}/edit" target=”_blank”>编辑</a>
                    <a href="{{ cartoon.getId }}/deletecartoonpre" target=”_blank”>删除</a>
                </td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}
